package org.lq.shopping.entity;

import java.io.Serializable;

/**
 * 发票
 * @author 无语
 *
 * @时间 2018年9月26日
 * EShop
 */
public class ShopInvoice implements Serializable{

	/**
	 *序列版本号 
	 */
	private static final long serialVersionUID = 5782843905266745980L;
	
	private int invoice_id;//发票编号
	private int order_id;//订单编号
	private String invoice_itype;//发票类型
	private String invoice_name;//发票抬头
	private int user_id;//用户ID
	
	public ShopInvoice() {
		super();
	}
	public ShopInvoice(int invoice_id, int order_id, String invoice_itype, String invoice_name, int user_id) {
		super();
		this.invoice_id = invoice_id;
		this.order_id = order_id;
		this.invoice_itype = invoice_itype;
		this.invoice_name = invoice_name;
		this.user_id = user_id;
	}
	public int getInvoice_id() {
		return invoice_id;
	}
	public void setInvoice_id(int invoice_id) {
		this.invoice_id = invoice_id;
	}
	public int getOrder_id() {
		return order_id;
	}
	public void setOrder_id(int order_id) {
		this.order_id = order_id;
	}
	public String getInvoice_itype() {
		return invoice_itype;
	}
	public void setInvoice_itype(String invoice_itype) {
		this.invoice_itype = invoice_itype;
	}
	public String getInvoice_name() {
		return invoice_name;
	}
	public void setInvoice_name(String invoice_name) {
		this.invoice_name = invoice_name;
	}
	public int getUser_id() {
		return user_id;
	}
	public void setUser_id(int user_id) {
		this.user_id = user_id;
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + invoice_id;
		result = prime * result + ((invoice_itype == null) ? 0 : invoice_itype.hashCode());
		result = prime * result + ((invoice_name == null) ? 0 : invoice_name.hashCode());
		result = prime * result + order_id;
		result = prime * result + user_id;
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ShopInvoice other = (ShopInvoice) obj;
		if (invoice_id != other.invoice_id)
			return false;
		if (invoice_itype == null) {
			if (other.invoice_itype != null)
				return false;
		} else if (!invoice_itype.equals(other.invoice_itype))
			return false;
		if (invoice_name == null) {
			if (other.invoice_name != null)
				return false;
		} else if (!invoice_name.equals(other.invoice_name))
			return false;
		if (order_id != other.order_id)
			return false;
		if (user_id != other.user_id)
			return false;
		return true;
	}
	@Override
	public String toString() {
		return "ShopInvoice [invoice_id=" + invoice_id + ", order_id=" + order_id + ", invoice_itype=" + invoice_itype
				+ ", invoice_name=" + invoice_name + ", user_id=" + user_id + "]";
	}
	
	
	
}
